package com.blogspot.wanyancan.client.image;

import com.google.gwt.user.client.rpc.RemoteService;

/**
 * @author billy
 * 
 */
public interface ImageService extends RemoteService {

	ImageRec[] getImage(int startIndex, int numCount);

	/**
	 * 
	 * @param id,
	 *            the identifier of the record in db
	 * @return the record(id,name,desc) or null if not found
	 * @throws DataAccessException
	 */
	ImageRec getImage(String id);

	ImageRec getImage(String id, String db);

	/**
	 * clear the db @
	 */
	void clearDatabase();

	void clearDatabase(String db);

	/**
	 * delete all images under the same name
	 * 
	 * @param name @
	 */
	void deleteImage(String name);

	void deleteImage(String name, String db);

	/**
	 * update this image having 'name' by prop
	 * 
	 * @param name,
	 * @param prop,
	 * formatted as "1,3,4,7" @
	 */
	void updateImgClass(String name, String prop);

	void updateImgClass(String name, String prop, String db);

	/**
	 * delete 'the' image given by 'id'
	 * 
	 * @param id
	 * @param name,
	 * not used @
	 */
	void deleteImageId(String id, String name);

	void deleteImageId(String id, String name, String db);

	/**
	 * change the name, description by Id
	 * 
	 * @param id
	 * @param name @
	 */
	void UpdateImageId(String id, String name, String desc);

	void UpdateImageId(String id, String name, String desc, String db);
}
